﻿@model GitCandy.Models.TeamModel

@{
    ViewBag.Title = string.Format(SR.Shared_TitleFormat, string.Format(SR.Team_DetailTitle, Model.Name));
    var token = GitCandy.Security.Token.Current;
}

<h3>@string.Format(SR.Team_DetailTitle, Model.Name)</h3>


@if (Model != null)
{
    <dl class="dl-horizontal">

        <dt>@Html.DisplayNameFor(s => s.Name)</dt>
        <dd>@Model.Name</dd>

        <dt>@Html.DisplayNameFor(s => s.Members)</dt>
        <dd>@Html.DisplayFor(s => s.Members)</dd>

        <dt>@Html.DisplayNameFor(s => s.Repositories)</dt>
        <dd>@Html.DisplayFor(s => s.Repositories)</dd>

        <dt>@Html.DisplayNameFor(s => s.Description)</dt>
        <dd>@Model.Description</dd>

        @if (token != null &&  token.IsSystemAdministrator)
        {
        <dt></dt>
        <dd>
            @Html.ActionLink(SR.Shared_Edit, "Edit", new { name = Model.Name }, new { @class = "btn btn-primary" })
            @Html.ActionLink(SR.Team_Members, "Users", new { name = Model.Name }, new { @class = "btn btn-info" })
        </dd>
        }
    </dl>
}
